class Page < ActiveRecord::Base
  belongs_to :friend
  has_many :notes
  attr_protected :public, :created_at, :friend_id
  
  def content_html
    RedCloth.new(content).to_html(:textile)
  end
  
  def self.list(page, cond)
    paginate :per_page => 1, 
             :page => page,
             :conditions => cond,
             :order => 'created_at desc'
  end
  
end
